package com.xwm93up.basic.enumtips;

/**
 * @Description: desc
 * @Author: xwm93up
 * @Since: 2023/2/27 9:51
 */
public class TrafficLight {
    Signal color = Signal.RED;

    public void change() {
        switch (color) {
            case RED:
                color = Signal.GREEN;
                break;
            case YELLOW:
                color = Signal.RED;
                break;
            case GREEN:
                color = Signal.YELLOW;
                break;
        }
    }
}
